home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Oberon⁄F™ 1.2 / Preinstalled version / System / Docu / Controllers (.txt) < prev    next >
Encoding:
Oberon Document  |  1996-07-08  |  32.4 KB  |  504 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Helvetica
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. Helvetica
  22. Helvetica
  23. HostPictures.StdViewDesc
  24. Geneva
  25. model
  26. controller
  27. controller
  28. uld be
  29. Helvetica
  30. Helvetica
  31. Geneva
  32. front path
  33. target path
  34. front focus
  35. target focus
  36. front window
  37. bottom window
  38. focus hierarchy
  39. Helvetica
  40. Controllers
  41. DEFINITION Controllers;
  42.     IMPORT Fonts, Ports, Stores, Views;
  43.     CONST
  44.         frontPath = FALSE; targetPath = TRUE;
  45.         decLine = 0; incLine = 1; decPage = 2; incPage = 3; gotoPos = 4;
  46.         nextPageX = 0; nextPageY = 0; gotoPageX = 2; gotoPageY = 3;
  47.         cut = 0; copy = 1;
  48.         pasteChar = 2; pasteLChar = 3; paste = 4;
  49.         doubleClick = 0; extend = 1; modifiy = 2;
  50.         noMark = FALSE; mark = TRUE;
  51.         hide = FALSE; show = TRUE;
  52.     TYPE
  53.         LONGCHAR = INTEGER;
  54.         Controller = POINTER TO ControllerDesc;
  55.         ControllerDesc = RECORD (Stores.StoreDesc)
  56.             PROCEDURE (c: Controller) CopyFrom (source: Controller);
  57.             PROCEDURE (c: Controller) InitView (v: Views.View);
  58.             PROCEDURE (c: Controller) ThisView (): Views.View;
  59.             PROCEDURE (c: Controller) ThisFocus (): Views.View;
  60.             PROCEDURE (c: Controller) ConsiderFocusRequestBy (view: Views.View);
  61.             PROCEDURE (c: Controller) RestoreMarks (f: Views.Frame; l, t, r, b: LONGINT);
  62.             PROCEDURE (c: Controller) Neutralize;
  63.             PROCEDURE (c: Controller) HandleModelMsg (VAR msg: Models.Message);
  64.             PROCEDURE (c: Controller) HandleViewMsg (f: Views.Frame; VAR msg: Views.Message);
  65.             PROCEDURE (c: Controller) HandleCtrlMsg (f: Views.Frame; VAR msg: Message;
  66.                                                                                     focus: Views.View);
  67.             PROCEDURE (c: Controller) HandlePropMsg (VAR msg: Views.PropMessage)
  68.         END;
  69.         Directory = POINTER TO DirectoryDesc;
  70.         DirectoryDesc = RECORD
  71.             PROCEDURE (d: Directory) New (): Controller
  72.         END;
  73.         Forwarder = POINTER TO ForwarderDesc;
  74.         ForwarderDesc = RECORD
  75.             PROCEDURE (n: Forwarder) Forward (target: BOOLEAN; VAR msg: Message);
  76.             PROCEDURE (n: Forwarder) Transfer (VAR msg: TransferMessage)
  77.         END;
  78.         Message = Views.CtrlMessage;
  79.         PollFocusMsg = RECORD (Message)
  80.             focus: Views.Frame
  81.         END;
  82.         PollSectionMsg = RECORD (Message)
  83.             focus, vertical: BOOLEAN
  84.             wholeSize, partSize, partPos: LONGINT;
  85.             valid, done: BOOLEAN
  86.         END;
  87.         PollOpsMsg = RECORD (Message)
  88.             type: Stores.TypeName;
  89.             singleton, pasteForm: Views.View;
  90.             selectable: BOOLEAN;
  91.             valid: SET
  92.         END;
  93.         ScrollMsg = RECORD (Message)
  94.             focus, vertical: BOOLEAN
  95.             op: INTEGER;
  96.             pos: LONGINT;
  97.             done: BOOLEAN
  98.         END;
  99.         PageMsg = RECORD (Message)
  100.             op: INTEGER;
  101.             pageX, pageY: INTEGER;
  102.             done, eox, eoy: BOOLEAN
  103.         END;
  104.         TickMsg = RECORD (Message)
  105.             tick: LONGINT
  106.         END;
  107.         MarkMsg = RECORD (Message)
  108.             show: BOOLEAN
  109.         END;
  110.         SelectMsg = RECORD (Message)
  111.             set: BOOLEAN
  112.         END;
  113.         RequestMessage = RECORD (Message)
  114.             requestFocus: BOOLEAN
  115.         END;
  116.         EditMsg = RECORD (RequestMessage)
  117.             op: INTEGER;
  118.             modifiers: SET;
  119.             char: CHAR;
  120.             lchar: LONGCHAR;
  121.             view: Views.View;
  122.             w, h: LONGINT;
  123.             isSingle: BOOLEAN;
  124.             clipboard: BOOLEAN
  125.         END;
  126.         ReplaceViewMsg = RECORD (RequestMessage)
  127.             old, new: Views.View
  128.         END;
  129.         CursorMessage = RECORD (RequestMessage)
  130.             x, y: LONGINT
  131.         END;
  132.         PollCursorMsg = RECORD (CursorMessage)
  133.             cursor: INTEGER
  134.         END;
  135.         TrackMsg = RECORD (CursorMessage)
  136.             modifiers: SET
  137.         END;
  138.         TransferMessage = RECORD (CursorMessage)
  139.             source: Views.Frame;
  140.             sourceX, sourceY: LONGINT
  141.         END;
  142.         PollDropMsg = RECORD (TransferMessage)
  143.             mark: BOOLEAN;
  144.             show: BOOLEAN;
  145.             type: Stores.TypeName;
  146.             isSingle: BOOLEAN;
  147.             w, h: LONGINT;
  148.             rx, ry: LONGINT;
  149.             dest: Views.Frame
  150.          END;
  151.         DropMsg = RECORD (CursorMessage)
  152.             view: Views.View;
  153.             isSingle: BOOLEAN;
  154.             w, h: LONGINT;
  155.             rx, ry: LONGINT
  156.         END;
  157.         resolution-: LONGINT;
  158.         path-: BOOLEAN;
  159.     PROCEDURE Forward (VAR msg: Message);
  160.     PROCEDURE FocusFrame (): Views.Frame;
  161.     PROCEDURE FocusView (): Views.View;
  162.     PROCEDURE FocusModel (): Models.Model;
  163.     PROCEDURE Register (f: Forwarder);
  164.     PROCEDURE Delete (f: Forwarder);
  165.     PROCEDURE ForwardVia (target: BOOLEAN; VAR msg: Message);
  166.     PROCEDURE SetCurrentPath (target: BOOLEAN);
  167.     PROCEDURE PollSection (VAR msg: PollSectionMsg);
  168.     PROCEDURE PollOps (VAR msg: PollOpsMsg);
  169.     PROCEDURE PollCursor (x, y: LONGINT; VAR cursor: INTEGER);
  170.     PROCEDURE Transfer (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  171.                                             VAR msg: TransferMessage);
  172.     PROCEDURE PollDrop (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  173.                                             mark, show: BOOLEAN; type: Stores.TypeName; isSingle: BOOLEAN;
  174.                                             w, h, rx, ry: LONGINT; VAR dest: Views.Frame; VAR destX, destY: LONGINT);
  175.     PROCEDURE Drop (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  176.                                     view: Views.View; isSingle: BOOLEAN; w, h, rx, ry: LONGINT);
  177.     PROCEDURE PasteView (view: Views.View; w, h: LONGINT; clipboard: BOOLEAN);
  178. END Controllers.
  179. Picture a: Model-View-Controller Separation
  180. A controller implements the interactive behavior for a view class. It is an object which transforms controller messages into model or view transformations.
  181. A controller message is a message which is sent along exactly one path in a view hierarchy, the focus path. Every view on such a path decides for itself whether it is the terminal of this path, i.e. whether it is the current focus, or whether the message should be forwarded to one of its embedded views. Oberon supports two focus paths, namely a target and a front focus. Both paths may fall together into one. The target path defines which view is the target of commands in dialogs. The front path defines which view is being edited, via mouse, keyboard, or menus.
  182. Picture b:  Simplified Example of Focus Hierarchy
  183. It is important to note that all controller messages which are not relevant for a particular view type can simply be ignored.
  184. CONST frontPath
  185. This value may be passed as target parameter to several procedures of this module. It lets a focus message be sent along the front focus path.
  186. CONST targetPath
  187. This value may be passed as target parameter to several procedures of this module. It lets a controller message be sent along the target focus path.
  188. CONST decLine, incLine, decPage, incPage
  189. These values can be assigned to the ScrollMsg.op field. They will cause the receiver view to scroll by increments or decrements of one line or page. It is up to the receiver to define what constitutes a "line" in its model, except that it should be smaller than a page. A page should correspond to the width/height of the focus frame.
  190. CONST gotoPos
  191. This value can be assigned to the ScrollMsg.op field. It causes the receiver view to scroll to the position given by ScrollMsg.pos.
  192. CONST nextPageX, nextPageY
  193. This value can be assigned to the PageMsg.op field. It causes the receiver view to display the next page in x resp. in y direction.
  194. CONST gotoPageX, gotoPageY
  195. This value can be assigned to the PageMsg.op field. It causes the receiver view to display a given page in x resp. in y direction.
  196. CONST cut, copy
  197. These values can be assigned to the EditMsg.op field. They should be handled by the receiver view in the following way:
  198.  - cut    delete selection, and assign a new view containing the deleted data or a copy thereof to EditMsg.view
  199.  - copy    copy selection, and assign a new view containing the copied data to EditMsg.view
  200. CONST pasteChar, pasteLChar
  201. These values can be assigned to the EditMsg.op field. They denote the input of a CHAR value, or of a LONGCHAR value, respectively.
  202. CONST paste
  203. This value can be assigned to the EditMsg.op field. The receiver view should insert a copy of the data that EditMsg.view contains. If it cannot insert the data directly because it doesn't know its type, it should insert a copy of the whole EditMsg.view into its model if it has this capability, i.e. if it is a container.
  204. CONST doubleClick
  205. This value means that a mouse button has been pressed in a way which is interpreted by the underlying user interface as a "double click".
  206. CONST extend, modify
  207. Oberon operates with two virtual modifier keys. The extend key is used to extend or toggle selections (usually the Shift key), the modify key to change the default behavior of a command (e.g. to change a drag-and-move into a drag-and-copy, using the option key on the Macintosh). The behavior of possible additional modifier keys is platform-specific.
  208. CONST noMark, mark
  209. Used internally.
  210. CONST hide, show
  211. These constants may be used for the PollDropMsg message and the PollDrop procedure. They determine whether target feedback during drag & drop should be drawn (show) or removed (hide).
  212. TYPE LONGCHAR
  213. Type for 2-byte characters in the Unicode character set.
  214. TYPE Controller
  215. Interface, Extension
  216. A controller is the third component of the model-view-controller triple. It's main purpose is to translate controller messages into model or view transformations. Simple applications can implement the controller's functionality in the view itself, thus needing no separate controller object at all. Container views usually have a separate controller.
  217. PROCEDURE (c: Controller) CopyFrom (source: Controller)
  218. Copy the contents of source to c. Copy only non-shared state, i.e. don't copy the controller's model or view.
  219. source is a covariant input parameter, i.e. an extension of c requires an extended source.
  220. CopyFrom is called in the controller's view's CopyFrom procedure.
  221. CopyFrom is extended if the controller has some state.
  222. Super call at the beginning is mandatory.
  223. source # NIL    21
  224. PROCEDURE (c: Controller) InitView (v: Views.View)
  225. Assign or de-assign the controller's view.
  226. v is a covariant input parameter, i.e. extensions of c require an extended v.
  227. v = NIL  #  c.ThisView() = NIL   OR   v = c.ThisView()    21
  228. v = NIL  OR  v.ThisModel() # NIL    23
  229. c.ThisView() = v
  230. c.ThisFocus() = NIL
  231. v = NIL
  232.     c.ThisModel() = NIL
  233. v # NIL
  234.     c.ThisModel() = v.ThisModel()
  235. PROCEDURE (c: Controller) ThisView (): Views.View
  236. Interface
  237. Returns the view to which the controller is connected.
  238. PROCEDURE (c: Controller) ThisFocus (): Views.View
  239. Default
  240. Returns the current focus.
  241. ThisFocus is called to determine which view, if any, is currently focus. Typically this happens in a container view's Restore procedure before InstallFrame is called.
  242. ThisFocus should be extended by a container controller, otherwise it returns NIL as default.
  243. PROCEDURE (c: Controller) ConsiderFocusRequestBy (view: Views.View)
  244. Empty, Forwarded from view
  245. PROCEDURE (c: Controller) RestoreMarks (f: Views.Frame; l, t, r, b: LONGINT)
  246. Empty, Forwarded from view
  247. PROCEDURE (c: Controller) Neutralize
  248. Empty, Forwarded from view
  249. PROCEDURE (c: Controller) HandleModelMsg (VAR msg: Models.Message)
  250. Empty, Forwarded from view
  251. PROCEDURE (c: Controller) HandleViewMsg (f: Views.Frame; VAR msg: Views.Message)
  252. Empty, Forwarded from view
  253. PROCEDURE (c: Controller) HandleCtrlMsg (f: Views.Frame; VAR msg: Message;
  254.                                                                                 focus: Views.View)
  255. Empty, Forwarded from view
  256. PROCEDURE (c: Controller) HandlePropMsg (VAR msg: Views.PropMessage)
  257. Empty, Forwarded from view
  258. TYPE Directory
  259. Interface
  260. Usually there is a controller directory in the views module of a subsystem, since the view directory must be able to allocate an appropriate controller. Such a directory is installed by the corresponding controller module upon loading. To guarantee the loading of the corresponding controller module is loaded, the view module's body usually contains a statement of the form Dialog.Call("XYZControllers.Install, "", res).
  261. PROCEDURE (d: Directory) New (): Controller
  262. Interface
  263. Returns a new controller.
  264. result # NIL
  265. result.ThisView() = NIL
  266. TYPE Forwarder
  267. Interface
  268. Used internally.
  269. PROCEDURE (n: Forwarder) Forward (target: BOOLEAN; VAR msg: Message)
  270. Interface
  271. Used internally.
  272. PROCEDURE (n: Forwarder) Transfer (VAR msg: TransferMsg)
  273. Interface
  274. Used internally
  275. TYPE Message
  276. Interface
  277. Base type of all controller messages. In contrast to model and view messages, a controller message is never broadcast. Instead, it is passed along a focus path. The target and front focus paths are predefined.
  278. TYPE PollFocusMsg
  279. Extension
  280. This message is sent to find out the leaf view of a focus path. The message is handled by the framework itself. If your view should not give away its identity when it is focus, set focus to NIL when receiving the message. Otherwise ignore the message.
  281. focus: Views.Frame
  282. After the message returns from the traversal of a focus path, it should contain the frame of the leaf view of this path.
  283. TYPE PollSectionMsg
  284. Extension
  285. This message is sent to poll the focus view's current scroll state. Oberon/F contains a generic scrolling mechanism which scrolls simply by changing the scrolled frame's origin. Explicit handling of scrolling is only necessary for views which can become extremely large, and whose efficient implementation crucially depends on keeping frames small.
  286. focus: BOOLEAN
  287. This flag tells whether a container should forward the message to its focus or not. Non-containers obviously cannot forward to a focus.
  288. vertical: BOOLEAN
  289. Tells whether the vertical or horizontal direction is polled.
  290. wholeSize: LONGINT    wholeSize >= 1
  291. This value denotes the focus view's width or height, in coordinates which a view can freely choose, i.e. they need not necessarily be universal units.
  292. partSize: LONGINT    0 <= partSize <= wholeSize
  293. This value denotes the focus view frame's width or height, in the same coordinates as above. If partSize cannot be easily defined, it should be set to 0.
  294. partPos: LONGINT    0 <= partPos <= wholeSize - partSize
  295. This value denotes the focus view's origin, in the same coordinates as above.
  296. valid: BOOLEAN
  297. The receiving view should set this flag if it supports scrolling in the given direction. valid indicates that wholeSize, partSize, and partPos are valid indicators of the view's scroll position.
  298. done: BOOLEAN
  299. This flag should be set if the message has been interpreted, i.e. if the above output fields have been set. For some controllers this may depend on op, e.g. if the controller supports horizontal or vertical scrolling only.
  300. TYPE PollOpsMsg
  301. Extension
  302. This message is sent to inquire which editing operations the focus view supports, depending on its current selection.
  303. type: Stores.TypeName
  304. This field denotes a context for the focus view. This context is used to determine which menus are relevant for the focus view. As a convention, a view assigns the type name of its abstract base type to type, e.g. "TextViews.ViewDesc". If the view doesn't support any such context, ignore this field.
  305. singleton: Views.View
  306. A container view which supports a selection should set this field to the selected view, if this view is the only contents currently selected.
  307. pasteForm: Views.View    valid iff = paste
  308. The view of which a copy would be pasted, if a paste operation occurred.
  309. selectable: BOOLEAN
  310. This field should be set to TRUE if the focus view contains selectable elements, independent of whether they are currently selected or not.
  311. valid: SET
  312. This set denotes which edit operations (i.e. cut .. paste) are currently possible.
  313. TYPE ScrollMsg
  314. Extension
  315. This message is sent in order to let the focus view scroll to another position. It is used only in conjunction with PollSectionMsg (cf. above).
  316. focus: BOOLEAN
  317. This flag tells whether a container should forward the message to its focus or not. Non-containers obviously cannot forward to a focus.
  318. vertical: BOOLEAN
  319. Denotes whether scrolling should occur in the vertical or in the horizontal direction.
  320. op: INTEGER    op IN {decLine..gotoPos}
  321. Scroll operation to be performed.
  322. pos: LONGINT    valid iff op = gotoPos    pos >= 0
  323. This denotes the position to be scrolled to, in the same coordinates that the PollSectionMsg uses.
  324. done: BOOLEAN
  325. This flag should be set if the message has been interpreted; for some controllers, this may depend on op.
  326. TYPE PageMsg
  327. Extension
  328. A page message is similar to a scroll message, but measures are in pages. It can be interpreted if the view should behave differently depending whether it is being printed or not. This is done e.g. in TextViews to avoid the last line on a page to become clipped, which is acceptable on screen.
  329. If this message is not interpreted for a view which cannot be printed on one page, a default printing strategy is used which decomposes the view into suitable pieces for printing.
  330. op: INTEGER    op IN {nextPageX, nextPageY, gotoPageX, gotoPageY}
  331. Where to scroll to.
  332. pageX, pageY: INTEGER
  333. Current page in x and in y directions.
  334. done: BOOLEAN
  335. This flag should be set if the message has been interpreted; for some controllers, this may depend on op.
  336. eox, eoy: BOOLEAN
  337. These flags should be set when it is attempted to go beyond the last page in the x resp. in y direction.
  338. TYPE TickMsg
  339. Extension
  340. This message is sent to the front focus view periodically. It can be used to realize effects like a blinking caret.
  341. tick: LONGINT
  342. Tick count. The difference between two ticks is given by the global variable resolution.
  343. TYPE MarkMsg
  344. Extension
  345. This message is sent whenever the target or front focus paths change. Before the change, the message is sent along the focus path with show = FALSE, such that the focus view can switch off visible marks like the selection or the caret. After the change (e.g. another window coming to the top), a MarkMsg is sent along the focus path with show = TRUE, such that the focus view can switch on its marks again, if there are any.
  346. show: BOOLEAN
  347. Tells whether the focus view's marks should be switched on or off.
  348. TYPE SelectMsg
  349. Extension
  350. This message is sent when the focus view should select all selectable items, or when it should deselect all selected items.
  351. set: BOOLEAN
  352. Determines whether everything should be selected (set = TRUE) or whether everything should be deselected (set = FALSE).
  353. TYPE RequestMessage
  354. Interface, Extension
  355. A view (or its controller) receiving a request message can indicate, by setting requestFocus to TRUE, that it wants to become focus afterwards, if it isn't already.
  356. requestFocus: BOOLEAN
  357. Set this flag to TRUE if receiver should become/remain focus after the message has been handled.
  358. TYPE EditMsg
  359. Extension
  360. This message is sent when a key was pressed, or when a cut/copy/paste operation was invoked. The following operations can be supported (for every supported operation, the corresponding flag in PollOpsMsg.valid should be set when receiving a PollOpsMsg):
  361. - cut
  362. Create a clone of the focus view, with a copy of its selection as contents. Assign this clone to EditMsg.view and delete the focus' selection. There is one exception: if the selection consists of exactly one view (a singleton), this view's clone should be copied to EditMsg.view, not a clone of its container.
  363. - copy
  364. Create a clone of the focus view, with a copy of the focus' selection as contents. Assign this clone to EditMsg.view. If the selection consists of exactly one view (a singleton), this view's clone should be copied to EditMsg.view.
  365. - pasteChar
  366. Interpret EditMsg.char, e.g. insert it into a text model.
  367. char may be a control character (-> Appendix). For control characters, check field modifiers also.
  368. - pasteLChar
  369. Interpret EditMsg.lchar, e.g. insert it into a text model.
  370. - paste
  371. Insert EditMsg.view view into the focus view's contents.
  372. If the receiver is a container:
  373.     If EditMsg.isSingle:
  374.         It should insert the view as a complete view, independent of its type.
  375.     If ~EditMsg.isSingle:
  376.         If it knows the contents of EditMsg.view, it should insert it, otherwise the complete view.
  377. If the receiver is not a container:
  378.     If it knows the contents of EditMsg.view, it should insert it, otherwise it should do nothing.
  379. op: INTEGER    op IN {cut .. paste}
  380. Operation to be performed.
  381. modifiers: SET    valid iff op IN {pasteChar, pasteLChar}
  382. Modifier keys.
  383. char: CHAR    valid iff op = pasteChar
  384. Character to be pasted, or to be interpreted in the case of control characters.
  385. lchar: LONGCHAR    valid iff op = pasteLChar
  386. Long character to be pasted.
  387. view: Views.View    valid iff op IN {paste, cut, copy}  &  view # NIL  &  view.context = NIL
  388. If op = paste:    (IN parameter)
  389. View which should be pasted.
  390. If op IN {cut, copy}:    (OUT parameter)
  391. View which should be assigned by the message handler.
  392. w, h: LONGINT    valid iff op IN {paste, cut, copy}
  393.                                 w >= Views.undefined  &  h >= Views.undefined    [units]
  394. If op = paste:    (IN parameter)
  395. The desired width and height of the pasted view. These values can be treated as hints. If they are not suitable, others can be used. The value Views.undefined should be handled also.
  396. If op IN {cut, copy}:    (OUT parameter)
  397. Current width and height of the view.
  398. isSingle: BOOLEAN    valid iff op IN {paste, cut, copy}
  399. If op = paste:    (IN parameter)
  400. Tells whether the pasted view should be inserted as singleton, i.e. not be merged even if this were possible.
  401. If op IN {cut, copy}:    (OUT parameter)
  402. The message handler should set this flag if the cut/copied view is selected as a singleton.
  403. clipboard: BOOLEAN    valid iff op IN {cut, copy, paste}
  404. This input parameter tells whether the cut/copied view will be transferred to the system clipboard, or whether the pasted view comes from the system clipboard.
  405. TYPE ReplaceViewMsg
  406. Extension
  407. A container should check whether it contains old. If so, it should replace old by new, without modifying the view's context in any way.
  408. old, new: Views.View    old # NIL & new # NIL
  409. old should be replaced by new.
  410. TYPE CursorMessage
  411. Interface, Extension
  412. The base type of all messages which denote some interaction that depends on the current cursor position.
  413. x, y: LONGINT
  414. Current cursor position.
  415. TYPE PollCursorMsg
  416. Extension
  417. This message is sent regularly to inquire which cursor the focus view currently desires.
  418. cursor: INTEGER    cursor IN {Ports.arrowCursor .. Ports.bitmapCursor}
  419. This field can be set to the cursor appropriate for the focus view.
  420. TYPE TrackMsg
  421. Extension
  422. This message is sent when the mouse button is pressed down.
  423. modifiers: SET
  424. Determines which modifier keys have been pressed together with the mouse button.
  425. TYPE TransferMessage
  426. Interface, Extension
  427. This is the base type of all messages which denote an interaction between several views, e.g. for drag and drop.
  428. source: Views.Frame
  429. The frame from which the interaction started, e.g. where the mouse button has been clicked for dragging.
  430. sourceX, sourceY: LONGINT
  431. The position in the source frame where the mouse button has been clicked, e.g. when starting to drag.
  432. TYPE PollDropMsg
  433. Extension
  434. While an item is being dragged around, PollDropMsgs are sent to enable feedback about the drop target.
  435. mark: BOOLEAN
  436. A container which supports drop feedback should show (hide) its feedback mark when mark is set (cleared). You don't need to deal with the view's border mark (the rectangular outline of the view which is drawn while you are dragging over a view), this is handled completely by Oberon/F itself.
  437. show: BOOLEAN    valid iff mark
  438. Indicates whether the mark should be drawn or removed.
  439. type: Stores.TypeName
  440. The type of the view to be dropped. The same naming convention as for the PollOpsMsg is used. Based on type, the message handler can determine whether the view to be dropped can be accepted. Note that if drag & drop happens completely within Oberon/F, the inherited message field source may also be used for this test. However, source may be NIL if OLE drag & drop occurs, or if OpenDoc drag & drop across document boundaries occurs.
  441. isSingle: BOOLEAN
  442. Tells whether the view to be dropped is a singleton selection.
  443. w, h: LONGINT
  444. Size of the view to be dropped. May be equal to Views.undefined.
  445. rx, ry: LONGINT    rx >= 0  &  ry >= 0
  446. The reference point inside the selection where drag & drop started.
  447. dest: Views.Frame    (OUT parameter)
  448. The receiver should set dest to its own frame, if it would accept a drop.
  449. TYPE DropMsg
  450. Extension
  451. This message is used if a view should be dragged and dropped to the cursor location.
  452. view: Views.View    view # NIL
  453. The view which is dropped. It is a copy of the original, and ready to be inserted at the drop destination.
  454. isSingle: BOOLEAN
  455. Tells whether the view to be dropped is a singleton selection.
  456. w, h: LONGINT    [units]
  457. The size of the dropped view. One or both sizes may have the value Views.undefined.
  458. rx, ry: LONGINT
  459. The reference point inside the selection where drag & drop started.
  460. VAR resolution-: LONGINT
  461. Time resolution. A value of 60 for resolution means that the difference between time = n and time = n + 1 is 1/60 second. The current time can be inquired by procedure Ticks.
  462. VAR path-: BOOLEAN
  463. Used internally.
  464. PROCEDURE Forward (VAR msg: Message)
  465. Send msg to to current focus.
  466. PROCEDURE FocusFrame (): Views.Frame
  467. Returns the current focus frame, if there is any.
  468. PROCEDURE FocusView (): Views.View
  469. Returns the current focus view, if there is any.
  470. PROCEDURE FocusModel (): Models.Model
  471. Returns the current focus view's model, if there is any.
  472. The following procedures are used internally:
  473. PROCEDURE Register (f: Forwarder)
  474. Add forwarder f to the list of forwarders. If f is already registered, Register(f) does nothing.
  475. f # NIL    20
  476. PROCEDURE Delete (f: Forwarder)
  477. Remove f from the list of forwarders. If f is not registered, nothing happens.
  478. f # NIL    20
  479. PROCEDURE ForwardVia (target: BOOLEAN; VAR msg: FocusMessage)
  480. Send msg to either target or front focus.
  481. PROCEDURE SetCurrentPath (target: BOOLEAN)
  482. Set path to target.
  483. PROCEDURE PollSection (VAR msg: PollSectionMsg)
  484. Poll the current focus view's scroll state.
  485. PROCEDURE PollOps (VAR msg: PollOpsMsg)
  486. Poll the current focus view's currently valid editing operations.
  487. PROCEDURE PollCursor (x, y: LONGINT; VAR cursor: INTEGER)
  488. Poll the current focus view's currently desired cursor.
  489. PROCEDURE Transfer (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  490.                                             VAR msg: TransferMessage)
  491. PROCEDURE PollDrop (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  492.                                                 mark, show: BOOLEAN; type: Stores.TypeName;
  493.                                                 isSingle: BOOLEAN; w, h, rx, ry: LONGINT;
  494.                                                 VAR dest: Views.Frame; VAR destX, destY: LONGINT)
  495. PROCEDURE Drop (x, y: LONGINT; source: Views.Frame; sourceX, sourceY: LONGINT;
  496.                                         view: Views.View; isSingle: BOOLEAN; w, h, rx, ry: LONGINT)
  497. PROCEDURE PasteView (view: Views.View; w, h: LONGINT; clipboard: BOOLEAN)
  498. TextControllers.StdCtrlDesc
  499. TextControllers.ControllerDesc
  500. Containers.ControllerDesc
  501. Controllers.ControllerDesc
  502. Helvetica
  503. Documents.ControllerDesc
  504.